home *** CD-ROM | disk | FTP | other *** search
/ Space & Astronomy / Space and Astronomy (October 1993).iso / pc / programs / mac / almanac.sit / Almanac v1.8 / card_11225.txt < prev    next >
Text File  |  1990-04-21  |  8KB  |  376 lines

  1. -- card: 11225 from stack: in.8
  2. -- bmap block id: 11518
  3. -- flags: 0000
  4. -- background id: 6859
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on calc
  8.   if cd fld RA is empty then set hilite of btn "Use 1950 Coords" to false
  9.   if cd fld RA2 is empty then set hilite of btn "Use 1950 Coords" to true
  10.   set cursor to watch
  11.   ST
  12.   if hilite of btn "Use 1950 Coords" then
  13.     conv
  14.     put 15*(cd fld RA + cd fld RAm/60) into dra
  15.     put sgn(cd fld Dec)*(abs(cd fld Dec)+cd fld Decm/60) into dec
  16.   else
  17.     conv2
  18.     put 15*(cd fld RA2 + cd fld RA2m/60) into dra
  19.     put sgn(cd fld Dec2)*(abs(cd fld Dec2)+cd fld Dec2m/60) into dec
  20.   end if
  21.   put pi/180 into fac
  22.   put line 1 of cd fld "Coords" of cd origin into lat
  23.   -- calc alt and az of object
  24.   put ((360+15*(line 2 of fld ST)-dra) mod 360) into LHA
  25.   put cosd(LHA)*sind(lat)-tand(dec)*cosd(lat) into den
  26.   put round(atanq(den,sind(LHA))/fac) into temp
  27.   put sind(lat)*sind(dec)+cosd(lat)*cosd(dec)*cosd(LHA) into sina
  28.   set cursor to busy
  29.   if abs(sina)<1 then
  30.     put round(atan(sina/(sqrt(1-sina*sina)))/fac) into alt
  31.     if alt>0 then
  32.       put temp&"┬░" into cd fld Az
  33.       put alt&"┬░" into cd fld Al
  34.     else
  35.       put "---" into cd fld Az
  36.       put "---" into cd fld Al
  37.     end if
  38.   else
  39.     beep
  40.   end if
  41. end calc
  42.  
  43. on conv
  44.   set cursor to busy
  45.   put 15*(cd fld RA + cd fld RAm/60) into ra
  46.   put sgn(cd fld Dec)*(abs(cd fld Dec)+cd fld Decm/60) into dec
  47.   put .6403615 into M
  48.   put .2783378 into N
  49.   put ra+(M+N*sind(ra)*tand(dec)) into ram
  50.   put dec+N*cosd(ram) into decm
  51.   put ra+M+N*sind(ram)*tand(decm) into ra2000
  52.   put dec+N*cosd(ram) into dec2000
  53.   put trunc(ra2000/15) into cd fld RA2
  54.   put rnd10(60*frac(ra2000/15)) into cd fld RA2m
  55.   put trunc(dec2000) into cd fld Dec2
  56.   put rnd10(60*abs(frac(dec2000))) into cd fld Dec2m
  57. end conv
  58.  
  59. on conv2
  60.   set cursor to busy
  61.   put 15*(cd fld RA2 + cd fld RA2m/60) into raz
  62.   put sgn(cd fld Dec2)*(abs(cd fld Dec2)+cd fld Dec2m/60) into decz
  63.   put .6403615 into M
  64.   put .2783378 into N
  65.   put raz-(M+N*sind(raz)*tand(decz)) into ramz
  66.   put decz-N*cosd(ramz) into decmz
  67.   put raz-M-N*sind(ramz)*tand(decmz) into ra1950
  68.   put decz-N*cosd(ramz) into dec1950
  69.   put trunc(ra1950/15) into cd fld RA
  70.   put rnd10(60*frac(ra1950/15)) into cd fld RAm
  71.   put trunc(dec1950) into cd fld Dec
  72.   put rnd10(60*abs(frac(dec1950))) into cd fld Decm
  73. end conv2
  74.  
  75. on enterInField
  76.   type tab
  77. end enterInField
  78.  
  79. on returnInField
  80.   type tab
  81. end returnInField
  82.  
  83.  
  84.  
  85. -- part 1 (field)
  86. -- low flags: 02
  87. -- high flags: 0002
  88. -- rect: left=135 top=84 right=104 bottom=160
  89. -- title width / last selected line: 0
  90. -- icon id / first selected line: 0 / 0
  91. -- text alignment: 0
  92. -- font id: 0
  93. -- text size: 12
  94. -- style flags: 0
  95. -- line height: 16
  96. -- part name: RA
  97.  
  98.  
  99. -- part 8 (field)
  100. -- low flags: 02
  101. -- high flags: 0002
  102. -- rect: left=183 top=84 right=104 bottom=220
  103. -- title width / last selected line: 0
  104. -- icon id / first selected line: 0 / 0
  105. -- text alignment: 0
  106. -- font id: 0
  107. -- text size: 12
  108. -- style flags: 0
  109. -- line height: 16
  110. -- part name: RAm
  111.  
  112.  
  113. -- part 2 (field)
  114. -- low flags: 02
  115. -- high flags: 0002
  116. -- rect: left=128 top=108 right=127 bottom=160
  117. -- title width / last selected line: 0
  118. -- icon id / first selected line: 0 / 0
  119. -- text alignment: 0
  120. -- font id: 0
  121. -- text size: 12
  122. -- style flags: 0
  123. -- line height: 16
  124. -- part name: Dec
  125.  
  126.  
  127. -- part 9 (field)
  128. -- low flags: 02
  129. -- high flags: 0002
  130. -- rect: left=183 top=108 right=127 bottom=220
  131. -- title width / last selected line: 0
  132. -- icon id / first selected line: 0 / 0
  133. -- text alignment: 0
  134. -- font id: 0
  135. -- text size: 12
  136. -- style flags: 0
  137. -- line height: 16
  138. -- part name: Decm
  139.  
  140.  
  141. -- part 5 (field)
  142. -- low flags: 02
  143. -- high flags: 0002
  144. -- rect: left=135 top=135 right=155 bottom=160
  145. -- title width / last selected line: 0
  146. -- icon id / first selected line: 0 / 0
  147. -- text alignment: 0
  148. -- font id: 0
  149. -- text size: 12
  150. -- style flags: 0
  151. -- line height: 16
  152. -- part name: RA2
  153.  
  154.  
  155. -- part 10 (field)
  156. -- low flags: 02
  157. -- high flags: 0002
  158. -- rect: left=183 top=135 right=155 bottom=220
  159. -- title width / last selected line: 0
  160. -- icon id / first selected line: 0 / 0
  161. -- text alignment: 0
  162. -- font id: 0
  163. -- text size: 12
  164. -- style flags: 0
  165. -- line height: 16
  166. -- part name: RA2m
  167.  
  168.  
  169. -- part 6 (field)
  170. -- low flags: 02
  171. -- high flags: 0002
  172. -- rect: left=129 top=160 right=179 bottom=160
  173. -- title width / last selected line: 0
  174. -- icon id / first selected line: 0 / 0
  175. -- text alignment: 0
  176. -- font id: 0
  177. -- text size: 12
  178. -- style flags: 0
  179. -- line height: 16
  180. -- part name: Dec2
  181.  
  182.  
  183. -- part 11 (field)
  184. -- low flags: 02
  185. -- high flags: 0002
  186. -- rect: left=184 top=160 right=179 bottom=220
  187. -- title width / last selected line: 0
  188. -- icon id / first selected line: 0 / 0
  189. -- text alignment: 0
  190. -- font id: 0
  191. -- text size: 12
  192. -- style flags: 0
  193. -- line height: 16
  194. -- part name: Dec2m
  195.  
  196.  
  197. -- part 3 (field)
  198. -- low flags: 02
  199. -- high flags: 0002
  200. -- rect: left=135 top=189 right=209 bottom=164
  201. -- title width / last selected line: 0
  202. -- icon id / first selected line: 0 / 0
  203. -- text alignment: 0
  204. -- font id: 0
  205. -- text size: 12
  206. -- style flags: 0
  207. -- line height: 16
  208. -- part name: Al
  209.  
  210.  
  211. -- part 4 (field)
  212. -- low flags: 02
  213. -- high flags: 0002
  214. -- rect: left=135 top=213 right=233 bottom=180
  215. -- title width / last selected line: 0
  216. -- icon id / first selected line: 0 / 0
  217. -- text alignment: 0
  218. -- font id: 0
  219. -- text size: 12
  220. -- style flags: 0
  221. -- line height: 16
  222. -- part name: Az
  223.  
  224.  
  225. -- part 7 (button)
  226. -- low flags: 00
  227. -- high flags: 8005
  228. -- rect: left=286 top=101 right=124 bottom=451
  229. -- title width / last selected line: 0
  230. -- icon id / first selected line: 0 / 0
  231. -- text alignment: 1
  232. -- font id: 0
  233. -- text size: 12
  234. -- style flags: 0
  235. -- line height: 16
  236. -- part name: Use 1950 Coords
  237. ----- HyperTalk script -----
  238. on mouseUp
  239.   set hilite of me to not hilite of me
  240.   set hilite of btn "Use 2000 Coords" to not hilite of me
  241. end mouseUp
  242.  
  243.  
  244.  
  245. -- part 12 (button)
  246. -- low flags: 00
  247. -- high flags: 8003
  248. -- rect: left=288 top=222 right=244 bottom=360
  249. -- title width / last selected line: 0
  250. -- icon id / first selected line: 0 / 0
  251. -- text alignment: 1
  252. -- font id: 0
  253. -- text size: 12
  254. -- style flags: 0
  255. -- line height: 16
  256. -- part name: Calculate
  257. ----- HyperTalk script -----
  258. on mouseUp
  259.   calc
  260. end mouseUp
  261.  
  262.  
  263.  
  264. -- part 14 (button)
  265. -- low flags: 00
  266. -- high flags: 0004
  267. -- rect: left=471 top=148 right=180 bottom=507
  268. -- title width / last selected line: 0
  269. -- icon id / first selected line: 2478 / 2478
  270. -- text alignment: 1
  271. -- font id: 0
  272. -- text size: 12
  273. -- style flags: 0
  274. -- line height: 16
  275. -- part name: New Button
  276. ----- HyperTalk script -----
  277. on mouseUp
  278.   show cd fld help
  279. end mouseUp
  280.  
  281.  
  282.  
  283. -- part 15 (field)
  284. -- low flags: 81
  285. -- high flags: 0004
  286. -- rect: left=38 top=183 right=283 bottom=431
  287. -- title width / last selected line: 0
  288. -- icon id / first selected line: 0 / 0
  289. -- text alignment: 0
  290. -- font id: 3
  291. -- text size: 12
  292. -- style flags: 0
  293. -- line height: 16
  294. -- part name: Help
  295. ----- HyperTalk script -----
  296. on mouseUp
  297.   hide cd fld help
  298. end mouseUp
  299.  
  300.  
  301. -- part 16 (button)
  302. -- low flags: 00
  303. -- high flags: C005
  304. -- rect: left=286 top=145 right=168 bottom=451
  305. -- title width / last selected line: 0
  306. -- icon id / first selected line: 0 / 0
  307. -- text alignment: 1
  308. -- font id: 0
  309. -- text size: 12
  310. -- style flags: 0
  311. -- line height: 16
  312. -- part name: Use 2000 Coords
  313. ----- HyperTalk script -----
  314. on mouseUp
  315.   set hilite of me to not hilite of me
  316.   set hilite of btn "Use 1950 Coords" to not hilite of me
  317. end mouseUp
  318.  
  319.  
  320.  
  321. -- part contents for background part 11
  322. ----- text -----
  323. Sidereal Time = 6:10
  324. 6.168512
  325.  
  326. -- part contents for background part 12
  327. ----- text -----
  328. Universal Time = 22:33
  329. 22.564167
  330.  
  331. -- part contents for card part 8
  332. ----- text -----
  333. 39.4
  334.  
  335. -- part contents for card part 2
  336. ----- text -----
  337. 2
  338.  
  339. -- part contents for card part 9
  340. ----- text -----
  341. 38.8
  342.  
  343. -- part contents for card part 4
  344. ----- text -----
  345. 270┬░
  346.  
  347. -- part contents for card part 3
  348. ----- text -----
  349. 5┬░
  350.  
  351. -- part contents for card part 10
  352. ----- text -----
  353. 42
  354.  
  355. -- part contents for card part 6
  356. ----- text -----
  357. 2
  358.  
  359. -- part contents for card part 11
  360. ----- text -----
  361. 54
  362.  
  363. -- part contents for card part 15
  364. ----- text -----
  365. Click the Calculate button to calculate altitude and azimuth from the coordinates for the selected epoch.  
  366. If the 1950 epoch coordinates are given, then the 2000 epoch coordinates are calculated and vice versa.
  367.  
  368.  
  369.  
  370. -- part contents for card part 5
  371. ----- text -----
  372. 1
  373.  
  374. -- part contents for card part 1
  375. ----- text -----
  376. 1